/**
 * create by young (young2f@outlook.com) on 2020/8/16
 */
'use strict';
module.exports = app => {
  const { router, controller } = app;
  router.post('/api/device/create', controller.iotDevice.createDevice);
  router.post('/api/device/create/many', controller.iotDevice.createDeviceMany);
  router.post('/api/device/find/all', controller.iotDevice.findDeviceMany);
  router.post('/api/device/find', controller.iotDevice.findDevice);
  router.post('/api/device/clear', controller.iotDevice.clearDevice);
  router.post('/api/device/data/find/many', controller.iotDevice.findDeviceDataMany);
  router.post('/api/device/setting/air/initValue', controller.iotDevice.settingAirInitValue);
  router.post('/api/device/setting/air/initValue/find', controller.iotDevice.findAirInitValue);
  router.post('/api/device/setting/air/initValue/batch', controller.iotDevice.settingAirInitValueBatch);

  router.post('/api/device/model/create', controller.iotDevice.createThingModel);
  router.post('/api/device/model/update', controller.iotDevice.updateThingModel);
  router.post('/api/device/model/delete', controller.iotDevice.deleteThingModel);
  router.post('/api/device/model/find', controller.iotDevice.findThingModel);
  router.post('/api/device/model/find/many', controller.iotDevice.findThingModelMany);
  router.post('/api/device/type/find/many', controller.iotDevice.findDeviceTypeMany);
};
